package jtk.project4.fleet.ibatis.dao;

import java.sql.SQLException;
import java.util.List;

import jtk.project4.fleet.domain.RbField;

public class RbFieldDao extends IbatisDao{
	
	public List selectRbField() throws SQLException {
		List selectRbField = null;
			selectRbField =getSqlMap().queryForList("SELECT_ALL_RBFIELD", null);
		return selectRbField;
	}

	public int deleteRbField(RbField rbfield) throws SQLException{
		return (int) getSqlMap().delete("DELETE_RBFIELD", rbfield);
	}
	
	public int updateRbField(RbField rbfield) throws SQLException{
		return (int) getSqlMap().update("UPDATE_RBFIELD", rbfield);
	}
	
	public RbField insertRbField(RbField rbfield) throws SQLException{
		return (RbField) getSqlMap().insert("INSERT_RBFIELD", rbfield);
	}

	public static void main (String args[]) throws SQLException{
		RbField rbField= new RbField();
		rbField.setTableName("restu");
		new RbFieldDao().deleteRbField(rbField);
		//rbField.setFieldAlias("CUPUERS");
		//new RbFieldDao().updateRbField(rbField);
		//rbField.setTableName("restu");
	}
	
}